import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;


public class AmazonDepartmentItems {
private int amazonItemsId;
private int departmentId;

public int getAmazonItemsId() {
	return amazonItemsId;
}
public void setAmazonItemsId(int amazonItemsId) {
	this.amazonItemsId = amazonItemsId;
}
public int getDepartmentId() {
	return departmentId;
}
public void setDepartmentId(int departmentId) {
	this.departmentId = departmentId;
}
public static void insert(Connection connection, AmazonDepartmentItems item) throws SQLException{
	
	PreparedStatement pr = connection.prepareStatement("insert into AmazonDepartmentItems(AmazonItemsId,departmentId) values(?,?) ");
	pr.setInt(1, item.getAmazonItemsId());
	pr.setInt(2, item.getDepartmentId());
	pr.executeUpdate();
	connection.commit();

	
}
}
